FROM xiaobu191/composer

SHELL ["/bin/sh", "-cex"]

WORKDIR /root/gatewayworker

COPY composer.json composer.lock ./

ENV COMPOSER_HOME=/var/composer \
    COMPOSER_CACHE_DIR=/var/composer/cache \
    COMPOSER_ALLOW_SUPERUSER=1

RUN composer install \
       --ignore-platform-reqs \
       --no-interaction \
       --no-plugins \
       --no-scripts \
       --prefer-dist \
       -vv \
    && composer clearcache

COPY app ./app

EXPOSE 8282

CMD ["php", "app/start.php", "start"]
